#include "widget.h"
#include "ui_widget.h"
#include <QDebug>
Widget::Widget(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::Widget)
{
    ui->setupUi(this);

    ui->comboBox_1->addItem("巨无霸寒汉堡");
    ui->comboBox_1->addItem("黑椒牛肉堡");
    ui->comboBox_1->addItem("奥尔良鸡腿堡");
    ui->spinBox_1->setMaximum(5);
    ui->spinBox_1->setMinimum(1);

    ui->comboBox_2->addItem("薯条");
    ui->comboBox_2->addItem("孜然肉块");
    ui->comboBox_2->addItem("快枪手鸡腿");
    ui->spinBox_2->setMaximum(3);
    ui->spinBox_2->setMinimum(1);

    ui->comboBox_3->addItem("可乐");
    ui->comboBox_3->addItem("雪碧");
    ui->spinBox_3->setMaximum(3);
    ui->spinBox_3->setMinimum(1);
}

Widget::~Widget()
{
    delete ui;
}


void Widget::on_pushButton_clicked()
{
    //选好了
    qDebug() << ui->comboBox_1->currentText() << " : " << ui->spinBox_1->value() << "份"
             << ui->comboBox_2->currentText() << " : " << ui->spinBox_2->value() << "份"
             << ui->comboBox_3->currentText() << " : " << ui->spinBox_3->value() << "份";
}
